<?php
class BalanceDetail extends ActiveRecord
{
    public $id_balance_detail;
    public $cash;
    public $type;
    public $before_remain_cash;
    public $after_remain_cash;
    public $desc;
    public $create_time;
    public $id_merchant;

    const ADD_TYPE = '1';
    const REDUCE_TYPE = '2';

    const ADD_DESC = '收款';
    const REDUCE_DESC = '交易手续费扣减';

    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }

    public function tableName()
    {
        return 'balance_detail';
    }

    /**
     * @return array validation rules for model attributes.
     */
    public function rules()
    {
        return array(
            array('id_balance_detail, cash, type, before_remain_cash, after_remain_cash, desc, create_time', 'safe'),
        );
    }

    /**
     * @return array customized attribute labels (name=>label)
     */
    public function attributeLabels()
    {
        return array(

        );
    }

    public function getAttributes($names = null)
    {
        $attributes = parent::getAttributes($names);


        return $attributes;
    }
}
